package net.adetech.crj.dao;

import com.jfinal.plugin.activerecord.Model;

import java.util.List;

public class Account extends Model<Account>{
    public static final Account dao = new Account().dao();

    public static Account getAccountByLoginName(String loginName)
    {
        List<Account> accountList = Account.dao.find("select * from CRJ_ACCOUNT where LOGIN_NAME = ?", loginName);
        if (accountList!=null && accountList.size()>0)
        {
            return accountList.get(0);
        }
        return null;
    }
}
